#include "LobbyWindow.h"
#include "Network.h"

LobbyWindow::LobbyWindow(Network* net) : m_net(net)
{
    setupUi(this);

    connect(m_net, SIGNAL(gameStarted()), this, SLOT(close()));
    connect(m_net, SIGNAL(lobbyStateChanged(bool)), this, SLOT(stateChanged(bool)));
    connect(readyButton, SIGNAL(clicked()), m_net, SLOT(changeLobbyState()));
}

void LobbyWindow::checkBoxChecked(QList<quint32> l)
{

}

void LobbyWindow::stateChanged(bool ready)
{
    qDebug() << "Called";
    p1->setEnabled(ready);
}

